package com.ruoyi.common.enums;

/**
 * 机构类型
 *
 * @author
 */

public enum MechanismLevel
{
    BUREAU("0", "正局"),BUREAUDEPUTY("1", "副局"), DIVISION("2", "正处级"),DIVISIONDEPUTY("3", "副处级"),
    DEPARTMENT("4", "正科级"),DEPARTMENTDEPUTY("5", "副科级"),INTERNALGROUP("6", "股级");


    private final String code;
    private final String info;

    MechanismLevel(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }



    public static MechanismLevel mechanismTypeOf(String action) {
        for(MechanismLevel actionEnum : values()){
            if(actionEnum.getCode().equals(action)){
                return actionEnum;
            }
        }
        throw new RuntimeException("没有找到对应的枚举");
    }
}
